

package com.kimo.shop.bean.app.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.kimo.shop.bean.model.Product;
import com.kimo.shop.common.serializer.json.ImgJsonSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author kimo-taozhouchuan
 */
@Data
public class ProductItemDto implements Serializable {

	@ApiModelProperty(value = "产品名称",required=true)
	private String prodName;

	@ApiModelProperty(value = "产品中文名称",required=true)
	private String prodNameCn;

	@ApiModelProperty(value = "产品英文名称",required=true)
	private String prodNameEn;

	@ApiModelProperty(value = "产品个数",required=true)
	private Integer prodCount;

	@ApiModelProperty(value = "产品图片路径",required=true)
	@JsonSerialize(using = ImgJsonSerializer.class)
	private String pic;

	@ApiModelProperty(value = "产品价格",required=true)
	private Double price;

	@ApiModelProperty(value = "分类id",required=true)
	private Long categoryId;

	@ApiModelProperty(value = "商品总金额",required=true)
	private Double productTotalAmount;

	@ApiModelProperty(value = "产品ID",required=true)
	private Long prodId;

    @ApiModelProperty(value = "skuId",required=true)
    private Long skuId;

	@ApiModelProperty(value = "规格名称", required = true)
	private String skuName;

	@ApiModelProperty(value = "使用积分",required=true)
	private Integer useScore;

	@ApiModelProperty(value = "产品所需积分",required=true)
	private Integer scorePrice = 0;

	@ApiModelProperty(value = "basketId",required=true)
	private Long basketId;

	@ApiModelProperty(value = "商品实际金额 = 商品总金额 - 分摊的优惠金额")
	private Double actualTotal;

	@ApiModelProperty(value = "满减满折优惠id，0不主动参与活动（用户没有主动参与该活动），-1主动不参与活动")
	private Long discountId = 0L;

	@ApiModelProperty(value = "分摊的优惠金额")
	private Double shareReduce = 0.0;

	@ApiModelProperty(value = "能否分摊优惠券优惠金额(1可以 0不可以)")
	private Integer isShareReduce;

	@ApiModelProperty(value = "分摊的积分抵现金额")
	private Double scorePayReduce;
//
//	@ApiModelProperty(value = "平台分摊的优惠金额")
//	private Double platformShareReduce = 0.0;

	@ApiModelProperty("参与满减活动列表")
	private List<DiscountDto> discounts = new ArrayList<>();
	/**
	 * 配送方式json
	 */
	private String deliveryMode;
	/**
	 * 配送方式
	 */
	private Product.DeliveryModeVO deliveryModeVO;

	@ApiModelProperty(value = "购物车是否勾选")
	private Boolean isCheck;
}
